package park;

public class J15Extends {


}

class J15SungJukV1{
	
	private String name;
	private int kor;
	private int eng;
	private int mat;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getKor() {
		return kor;
	}
	public void setKor(int kor) {
		this.kor = kor;
	}
	public int getEng() {
		return eng;
	}
	public void setEng(int eng) {
		this.eng = eng;
	}
	public int getMat() {
		return mat;
	}
	public void setMat(int mat) {
		this.mat = mat;
	}
	
	public int getTot(){
		
		return kor + eng + mat;
		
	}
	
}


class J15SungJukV1b{
	
	private String name;
	private int kor;
	private int eng;
	private int mat;
	private int sci;
	private int art;
	
	
}//상속을 사용하지 않은 경우


class J15SungJukV2 extends J15SungJukV1{
	
	private int sci;
	private int art;
	
	
	@Override //부모클래스의 값을 자식 클래스값에 맞게 재정의
	public int getTot() {
		
		return super.getTot() + sci + art;
		
	}
	
	
}//상속을 사용하는 경우



class Search4Super extends Object{
	
	
	
}



